Skip to content

Expose abandoned agent worktrees for takeover#67

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/detect-stranded-managed-worktrees-in-hiv-2026-04-27-12-36
Apr 27, 2026
Merged

Expose abandoned agent worktrees for takeover#67
NagyVikt merged 1 commit intomainfrom
agent/codex/detect-stranded-managed-worktrees-in-hiv-2026-04-27-12-36

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

Managed agent worktrees could exist without an active-session file, AGENT.lock telemetry, or GX file locks after a CLI stopped during quota or approval exhaustion. Hivemind now emits those bare worktrees as stranded managed-worktree lanes so MCP context marks them needs_attention and another agent can adopt the branch instead of missing it.

Constraint: Some quota-stop paths fail before codex-guard can enqueue takeover metadata.

Rejected: Rely only on stale active-session files | fully stopped sessions can leave only a managed worktree behind.

Confidence: high

Scope-risk: narrow

Directive: Keep active sessions, AGENT.lock telemetry, and GX file locks higher precedence than the stranded fallback.

Tested: pnpm --filter @colony/core test -- hivemind.test.ts

Tested: pnpm --filter @colony/mcp-server test -- server.test.ts

Tested: pnpm --filter @colony/core typecheck

Not-tested: pnpm --filter @colony/mcp-server typecheck has existing @colony/spec strict/type declaration failures.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@NagyVikt NagyVikt merged commit cd7df0d into main Apr 27, 2026
@NagyVikt NagyVikt deleted the agent/codex/detect-stranded-managed-worktrees-in-hiv-2026-04-27-12-36 branch April 27, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant